import type { AddressItem } from '@/types/address';
import { defineStore } from 'pinia';
import { ref } from 'vue';
export const useAddressStore = defineStore('address', () => {
  // 选中的收货地址
  const selectAddress = ref<AddressItem>();

  // 修改选中的收货地址
  const changeSelectAddress = (address: AddressItem) => {
    selectAddress.value = address;
  };
  return {
    selectAddress,
    changeSelectAddress,
  };
});
